{%extends file="common/page/layout.tpl"%}
{%block name="block_head_static"%}
    <script>
        P.data('summary',{%json_encode($summary)%})
    </script>
    {%require name="home:static/ui/button/button.less"%}
    {%require name="home:static/ui/bselect/bselect.less"%}
    {%require name="home:static/ui/bselect/bselect.js"%}
    {%require name="home:static/ui/modalbox/modalbox.js"%}
    {%require name="home:static/iphone6assets/iphone6assets.less"%}
    {%require name="home:static/iphone6assets/iphone6assets.js"%}
{%/block%}
{%block name="content"%}
    {%widget name="home:widget/menu/menu.tpl" call="menu" active="phone6assets"%}
    <div class="page-iphone6assets">
         <div class="iphone6assets-header">
             <div class="header-content">
                 <div class="data-type item1">
                     <i></i>
                     <div class="data-value">￥{%$summary.activity_amount%}</div>
                     <div class="data-name">套餐总额</div>
                 </div>
                 <div class="data-type item2">
                     <i></i>
                     <div class="data-value">￥{%$summary.credit%}</div>
                     <div class="data-name">已支付总额</div>
                 </div>

                 <div class="data-type item3">
                     <i></i>
                     {%if $summary.bank_number%}
                         <div class="data-value">{%if $summary.bank_number%}{%$summary.bank_number%}{%/if%}</div>
                         <div class="data-name">已绑定的银行卡，<a class="btn-modifybank">修改</a></div>
                         <div class='auto-withdraw'>系统会自动提现到绑定的银行卡</div>
                     {%elseif $summary.activity_type%}
                         <div class="data-value"></div>
                         <div class="data-name">已绑定的银行卡，<a class="btn-addbank">添加</a></div>
                         <div class='auto-withdraw'>系统会自动提现到绑定的银行卡</div>
                     {%else%}
                         <div class="data-value"></div>
                         <div class="data-name">已绑定的银行卡</div>
                     {%/if%}
                     <div class="bank-list">
                         您还没有添加银行卡，<a href="/user/withdraw">去添加</a>
                     </div>
                 </div>
             </div>
         </div>

        <div class="fund-list">
            {%if $list && $list|count%}
                <div class="recharge-iphone6">
                    <a href="http://mp.weixin.qq.com/s?__biz=MzA3ODk5NjkzNw==&mid=201470172&idx=1&sn=11eb85e0d4c7babbc760f4a1c6f5cf72#rd" target="_blank">免费购买iphone6</a>
                </div>
                <table>
                    <thead>
                    <tr>
                        <td>时间</td>
                        <td>我的预期收益</td>
                        <td>已返还收益</td>
                        <td>已返还本金</td>
                        <td>状态</td>
                        <td></td>
                    </tr>
                    </thead>
                    <tbody>
                    {%foreach $list as $item%}
                    <tr>
                        <td>{%$item.snap_date%}</td>
                        <td>￥{%$item.expect_profit%}</td>
                        <td>￥{%$item.return_profit%}</td>
                        <td>￥{%$item.return_amount%}</td>
                        <td>
                            {%if $item.status==1%}
                                 未提现
                            {%elseif $item.status==2%}
                                 提现中
                            {%elseif $item.status==3%}
                                 已提现
                            {%else%}
                                 未到提现时间
                            {%/if%}
                        </td>
                        <td>
                            {%*
                            {%if $item.status ==1%}
                                <a class="btn btn-enable" data-snap-date="{%$item.snap_date%}">提现</a>
                            {%/if%}
                            *%}
                        </td>
                    </tr>
                    {%/foreach%}
                    </tbody>
                </table>
            {%elseif $summary.activity_type && $summary.res_amount>0%}
                <a href="/iActivity/recharge">
                    <img src="../static/iphone6assets/image/no-pay.png">
                </a>
            {%else%}
                <a href="/iActivity/index">
                    <img src="../static/iphone6assets/image/no-activity.png">
                </a>
            {%/if%}

        </div>
    </div>
{%/block%}